package com.vhall.component.controller.chat;


import com.vhall.component.entity.chat.dto.QuickRepliesDTO;
import com.vhall.component.entity.chat.vo.QuickRepliesClientListVO;
import com.vhall.component.plugin.common.annotation.TokenAuth;
import com.vhall.component.service.chat.QuickRepliesClientService;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 直播间快捷回复
 * 快捷回复表 前端控制器 client(客户端)相关接口
 *
 * @author xing.wang
 * @since 2022-09-05
 */
@RestController
@RequestMapping("/v4/quick-replies/client")
@RequiredArgsConstructor
public class QuickRepliesClientController {
    private final QuickRepliesClientService service;
//    获取返回列表

    /**
     * [client]端显示开启的10条快捷回复数据
     *
     * @param vo 参数
     * @return 分页的快捷回复列表
     */
    @PostMapping("/list")
    @TokenAuth
    public List<QuickRepliesDTO> list(@Validated QuickRepliesClientListVO vo) {
        return service.list(vo);
    }
}


